﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IPC.Communication.Core.Address
{
    public class CnetAddressData : DeviceAddressDataBase
    {
        public string DataCode
        {
            get;
            set;
        }

        public string DataType
        {
            get;
            set;
        }

        public static OperateResult<CnetAddressData> ParseFrom(string address)
        {
            return CnetAddressData.ParseFrom(address, 0);
        }

        public static OperateResult<CnetAddressData> ParseFrom(string address, ushort length)
        {
            CnetAddressData cnetAddressData = new CnetAddressData();
            OperateResult<CnetAddressData> result;
            try
            {
                cnetAddressData.Length = length;
                bool flag = address[1] == 'X';
                if (flag)
                {
                }
            }
            catch (Exception ex)
            {
                result = new OperateResult<CnetAddressData>(ex.Message);
                return result;
            }
            result = OperateResult.CreateSuccessResult<CnetAddressData>(cnetAddressData);
            return result;
        }
    }
}
